package org.studiox.graph.janusgraph.common;

import org.studiox.graph.common.GraphVertex;

import java.util.Objects;

public class JanusGraphVertex extends GraphVertex {

  private Long id;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    if (!super.equals(o)) {
      return false;
    }
    JanusGraphVertex that = (JanusGraphVertex) o;
    return Objects.equals(id, that.id);
  }

  @Override
  public int hashCode() {
    return Objects.hash(super.hashCode(), id);
  }

  @Override
  public String toString() {
    return "JanusGraphVertex{" + "id=" + id + '}' + ",GraphVertex{" + super.toString() + "}";
  }
}
